home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / dos / communic / pcmail / main / hsearch.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-05  |  589 b   |  61 lines

  1. /* hsearch.c --- PD simple implementation of System V hsearch(3c) routine */
  2.  
  3.  
  4.  
  5.  /*
  6.  
  7.   * Original author: Arnold Robbins
  8.  
  9.   * 
  10.  
  11.   * Changes by me (WZV):
  12.  
  13.   * 
  14.  
  15.   * put this part of the original hsearch.c in a separate file
  16.  
  17.   * 
  18.  
  19.   * make the lookup and hashing algorithms case-insensitive
  20.  
  21.   */
  22.  
  23.  
  24.  
  25. #include <stdio.h>
  26.  
  27.  
  28.  
  29. typedef struct entry {
  30.  
  31.     char *key;
  32.  
  33.     char *data;
  34.  
  35.     } ENTRY;
  36.  
  37.  
  38.  
  39. typedef enum {
  40.  
  41.     FIND,
  42.  
  43.     ENTER
  44.  
  45.     } ACTION;
  46.  
  47.  
  48.  
  49. typedef struct element {
  50.  
  51.     ENTRY    item;
  52.  
  53.     struct element *next;
  54.  
  55.     } ELEMENT;
  56.  
  57.  
  58.  
  59. ENTRY *hsearch();
  60.  
  61.